#!/bin/sh
##install vundle
yum install git vim astyle the_silver_searcher -y
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
##config basic
cat >> ~/.vimrc <<EOF 
set nocompatible              " required
filetype off                  " required

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
call vundle#end()            " required
filetype plugin indent on    " required

"基础设置
set number "行号
syntax on "语法高亮
set tabstop=4   "缩进
set shiftwidth=4 

"折叠
Plugin 'tmhedberg/SimpylFold'
"补全
Plugin 'Valloric/YouCompleteMe'
"项目数
Plugin 'scrooloose/nerdtree'
" 这个插件可以显示文件的Git增删状态
Plugin 'Xuyuanp/nerdtree-git-plugin'
"全局搜
Plugin 'kien/ctrlp.vim'
"状态栏
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
set guifont=Inconsolata\ for\ Powerline:h15
let g:Powerline_symbols = 'fancy'
set encoding=utf-8
set t_Co=256
set fillchars+=stl:\ ,stlnc:\
	set term=xterm-256color
set termencoding=utf-8
"注释
Plugin 'scrooloose/nerdcommenter'   " commenter: \cc \cu
"括号/引号匹配
Plugin 'Raimondi/delimitMate'
"格式化，先安装astyle yum intall astyle
let g:formatdef_harttle = '"astyle --style=attach --pad-oper"'
let g:formatters_cpp = ['harttle']
let g:formatters_java = ['harttle']
"格式快捷键
noremap <F3> :Autoformat<CR>
"搜索  yum install the_silver_searcher
Plugin 'mileszs/ack.vim'
let g:ackprg = 'ag --nogroup --nocolor --column'
"函数列表
Plugin 'majutsushi/tagbar'
EOF

